package com.goosuncc.gscc.sdk.command.response.bean;

/**
 * 
 * 一条记录代表了指定表的指定列（字段）
 * 
 */
public class ExtColumn {
	
	//ID
	private Long id = null;
	
	// 表名。表示该列是属于哪个表的
	private String tableName= "";
	
	// 默认是否显示在界面上
	private Boolean display = true;
    
	// 字段名，如：`customerName`,同一个tableName内唯一
	// 注意细节，需要强制去除所有空格
	private String columnName = "";
	
	// 显示名，如：“客户姓名,同一个tableName内唯一.
	// 注意细节，需要强制去除所有空格
	private String columnDislpayName = "";
	
	// 描述
	private String columnDescrption = "";

	// 字段顺序。界面显示有时候需要明确的顺序。就用这个字段表示顺序。
	private int columnOrder = 0;
	
	// 字段类型，[字符串|整数|浮点数|日期|日期时间|枚举|布尔]
	private String columnType = "";
	
	// 字段元数据，如varchar的长度，enum的枚举值
	private String columnTypeMetaData = "";
	
	// 该字段是否非空
	// 该属性对应1）数据库的非空；2）前端表单的校验非空
	private Boolean notNull = false;
	
	// 该字段的默认值
	// 对于columnType=日期时间，该值为 now, today, yestoday
	//对于columnType=枚举，该值为 1,2,3,4,.....
    // 对于columnType=布尔，该值为 true, false
	// 该属性对应1）数据库的默认值；2）前端新建新某对象的表单中，该字段回显的值
	private String defaultValue = "";
	
	// 该字段是否要建索引
	private Boolean indexEnable = false;
	
	// 该字段是否要建索引
	private String indexName = "";
	
	// UNIQUE|FULLTEXT|NORMAL
	private String indexType = "";	
	
	// BTREE|HASH
	private String indexAlgorithm = "";

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public String getColumnDislpayName() {
		return columnDislpayName;
	}

	public void setColumnDislpayName(String columnDislpayName) {
		this.columnDislpayName = columnDislpayName;
	}

	public int getColumnOrder() {
		return columnOrder;
	}

	public void setColumnOrder(int columnOrder) {
		this.columnOrder = columnOrder;
	}

	public String getColumnType() {
		return columnType;
	}

	public void setColumnType(String columnType) {
		this.columnType = columnType;
	}

	public String getColumnTypeMetaData() {
		return columnTypeMetaData;
	}

	public void setColumnTypeMetaData(String columnTypeMetaData) {
		this.columnTypeMetaData = columnTypeMetaData;
	}

	public Boolean getNotNull() {
		return notNull;
	}

	public void setNotNull(Boolean notNull) {
		this.notNull = notNull;
	}

	public Boolean getIndexEnable() {
		return indexEnable;
	}

	public void setIndexEnable(Boolean indexEnable) {
		this.indexEnable = indexEnable;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public String getIndexName() {
		return indexName;
	}

	public void setIndexName(String indexName) {
		this.indexName = indexName;
	}

	public String getIndexType() {
		return indexType;
	}

	public void setIndexType(String indexType) {
		this.indexType = indexType;
	}

	public String getIndexAlgorithm() {
		return indexAlgorithm;
	}

	public void setIndexAlgorithm(String indexAlgorithm) {
		this.indexAlgorithm = indexAlgorithm;
	}

	public Boolean getDisplay() {
		return display;
	}

	public void setDisplay(Boolean display) {
		this.display = display;
	}

	public String getColumnDescrption() {
		return columnDescrption;
	}

	public void setColumnDescrption(String columnDescrption) {
		this.columnDescrption = columnDescrption;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
}